package com.knife.bbs.domain;

import java.util.Date;

import com.knife.dbo.IObject;
/**
 * BBS用户信息-通过实现IObject接口支持KnifeDBO零配置文件方式映射
 *
 */
public class UserInfo implements IObject {
	private String cid;
	private String username;
	private String password;
	private String sex;
	private String email;
	private String tel;
	private Integer logintimes;
	private Date inputtime;	
	private String intro;
	private Integer status;	
	private Date lastlogintime;
	private String lastloginip;
	private String photo;
	private String qq;
	private Integer score;
	

	public String getKeyField() {
		return "cid";
	}

	public String getKeyGenerator() {
		return "com.knife.dbo.RandomIdGenerator";
	}

	public String getTableName() {
		return "BBSUser";
	}		
	public String getCid() {
		return cid;
	}
	public void setCid(String cid) {
		this.cid = cid;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}	
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}	
	public Date getInputtime() {
		return inputtime;
	}
	public void setInputtime(Date inputTime) {
		this.inputtime = inputTime;
	}
	public String getLastloginip() {
		return lastloginip;
	}
	public void setLastloginip(String lastLoginIP) {
		this.lastloginip = lastLoginIP;
	}
	public Date getLastlogintime() {
		return lastlogintime;
	}
	public void setLastlogintime(Date lastLoginTime) {
		this.lastlogintime = lastLoginTime;
	}
	public Integer getLogintimes() {
		return logintimes;
	}
	public void setLogintimes(Integer loginTimes) {
		this.logintimes = loginTimes;
	}
	
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getIntro() {
		return intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String userName) {
		this.username = userName;
	}	
	
	public String getPhoto() {
		return photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}	
	public String getQq() {
		return qq;
	}
	public void setQq(String qq) {
		this.qq = qq;
	}	
	public Integer getScore() {
		return score;
	}
	public void setScore(Integer score) {
		this.score = score;
	}
	
	public void setUserInfo(com.knife.bbs.object.UserInfo user) {
		if (user.getCid() != null) {
			if (user.getCid().length() > 0) {
				this.cid = user.getCid();
			}
		}
		this.username = user.getUsername();
		this.password = user.getPassword();
		this.sex = user.getSex();
		this.email = user.getEmail();
		this.tel = user.getTel();
		this.logintimes = user.getLogintimes();
		this.inputtime = user.getInputtime();
		this.intro = user.getIntro();
		this.status = user.getStatus();
		this.lastlogintime = user.getLastlogintime();
		this.lastloginip = user.getLastloginip();
		this.photo = user.getPhoto();
		this.qq = user.getQq();
		this.score = user.getScore();
	}
}
